<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Request;

class Share extends Api
{
    // 无需登录的接口,*表示全部
    protected $noNeedLogin = ['*'];
    // 无需鉴权的接口,*表示全部
    protected $noNeedRight = ['*'];

    protected $service;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $this->service = new \app\api\service\Share();
    }

    public function get()
    {
        $input = $this->request->post();
        $data = $this->service->get($input['id']);
        $this->success('success', $data, 200);
    }
}
